/*
 * Copyright (c) 2016 zhangcm. All Rights Reserved.
 */
package com.jnzc.ocr.serv.system.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.jnzc.ocr.common.utils.ArrayHandleUtils;
import com.jnzc.ocr.common.utils.DateUtils;
import com.jnzc.ocr.dependencies.serv.mybatis.MybatisServiceImpl;
import com.jnzc.ocr.serv.system.entity.SysCompany;
import com.jnzc.ocr.serv.system.filter.SysCompanyFilter;
import com.jnzc.ocr.serv.system.mapper.SysCompanyMapper;
import com.jnzc.ocr.serv.system.service.SysCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangcm
 * @version 1.0, 2017/8/31
 */
@Service
public class SysCompanyServiceImpl extends MybatisServiceImpl<SysCompanyMapper, SysCompany, SysCompanyFilter> implements SysCompanyService {

    @Autowired
    private SysCompanyMapper sysCompanyMapper;

    @Override
    protected void fillEntityWrapper(EntityWrapper<SysCompany> ew, SysCompanyFilter filter) {
        SysCompany entity = new SysCompany();

        ew.setEntity(entity);
    }

    @Override
    public List<Long> listId() {
        SysCompanyFilter filter = new SysCompanyFilter();
        filter.setSelectBy("id");
        return ArrayHandleUtils.readAttrList(super.list(filter), "id");
    }
}
